/*
 * vector.h
 *
 *  Created on: Jun 18, 2010
 *      Author: Guilherme
 */

#ifndef VECTOR_H_
#define VECTOR_H_

typedef int distance;

typedef struct {
	int nodeID;
	distance distance;
} vector_element_t;

typedef struct {
	int size;
	int current_size;
	vector_element_t **elements;
} vector_t;

vector_t *init_vector(int size);
void insert_element(vector_t *v, vector_element_t *e);
int find_min(vector_t *v);
vector_element_t *delete_min(vector_t *v);
void decrease_key(vector_t *v, int nodeID, distance newDistance);
int is_empty(vector_t *v);
void destroy_vector(vector_t *v);


#endif /* VECTOR_H_ */
